package com.wrx.server.controller;

import com.wrx.server.pojo.User;
import com.wrx.server.service.IUserService;
import com.wrx.server.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试
 */
@RestController
public class TestController {
    @Autowired
    UserDetailsService userDetailsService;
    @GetMapping("test")
    public UserDetails test(){


        return userDetailsService.loadUserByUsername("wrx");
    }
}
